Span Calculator
This calculates the margin requirement for a list of input positions.
Request to be POSTed to uri : /NorenWClientAPI/SpanCalc
Request Details :
| Json Fields | Possible value | Description |
|---|---|---|
| jData* | Should send json object with fields in below list |
| Json Fields | Possible value | Description |
|---|---|---|
| actid* | Any Account id, preferably actual account id if sending from post login screen. | |
| pos | Array of json objects. (object fields given in below table) |
Position structure as follows:
| Json Fields of object in values Array | Possible value | Description |
|---|---|---|
| prd* | M/I | Product name |
| exch* | NFO, CDS, MCX ... | Exchange |
| instname* | FUTSTK, FUTIDX, OPTSTK, FUTCUR... | Instrument name |
| symname* | USDINR, ACC, ABB,NIFTY.. | Symbol name |
| exd* | 06-DEC-2022 | DD-MMM-YYYY format |
| optt | CE, PE | Option Type |
| strprc | 11900.00, 71.0025 | Strike price |
| buyqty | Buy Open Quantity | |
| sellqty | Sell Open Quantity | |
| netqty | Net traded quantity |
NOTE: In buyqty ,sellqty and netqty any one of the parameter compulsory.
Example:
curl --location 'https://api.kambala.co.in/NorenWClientAPI/SpanCalc' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Bearer ab2f4117bce53f6b6900c73eebe520468ceea148a3bc4423a973514150f3c415' \
--data 'jData={"actid":"DEMO","pos":[{"prd":"H","exch":"NFO","symname":"ULTRACEMCO","instname":"FUTSTK","exd":"30-MAR-2026","netqty":"50","optt":"XX"}]}'
Response Details :
Response data will be in json format with below fields.
| Json Fields | Possible value | Description |
|---|---|---|
| stat | Ok or Not_Ok | Market watch success or failure indication. |
| span | Span value | |
| expo | IExposure margin | |
| span_trade | Span value ignoring input fields buyqty, sellqty | |
| expo_trade | Exposure margin ignoring input fields buyqty, sellqty |
Sample Success Response :
{ "request_time": "11:43:54 19-03-2026", "stat": "Ok", "span": "77914.00", "expo": "19180.00", "span_trade": "77914.00", "expo_trade": "19180.00", "pre_trade": "0.00", "add": "0.00", "add_trade": "0.00", "ten": "0.00", "ten_trade": "0.00", "del": "0.00", "del_trade": "0.00", "spl": "0.00", "spl_trade": "0.00" }
Sample Failure Response :
{ "stat":"Not_Ok", "emsg":"Invalid Input : jData is Missing." }